﻿@model IEnumerable<IkoulaACDF.Models.RestrictedUsersListViewModel>
@section scripts{
    @Scripts.Render("~/bundles/tablesorter")

@*http://mottie.github.io/tablesorter/docs/example-widget-filter.html*@
<script type="text/javascript">

    var sorting = [[0, 0], [1, 0]];

    // note: the square brackets around sorting are required!
    $("table").trigger("sorton", [sorting]);
    $("table#sortTableExample").tablesorter(
        {
            widthFixed: true,
            showProcessing: true,
            headers: {
                6: { sorter: false, filter: false },    // sort second column numerically

                9: { sorter: false, filter: false },      // disable first column
            },
            widgets: ["filter"],
            widgetOptions: {
                // css class applied to the table row containing the filters & the inputs within that row
                filter_cssFilter: 'tablesorter-filter',

                // filter widget: If there are child rows in the table (rows with class name from "cssChildRow" option)
                // and this option is true and a match is found anywhere in the child row, then it will make that row
                // visible; default is false
                filter_childRows: false,

                // Set this option to true to use the filter to find text from the start of the column
                // So typing in "a" will find "albert" but not "frank", both have a's; default is false
                filter_startsWith: false,
            },

        });
</script>




}


@{
    ViewBag.Title = "Index";
}

<h2>Liste des membres <span class="badge">@ViewBag.CountMembers</span></h2>
<div class="container">
    <div class="table-responsive">
        <table id="sortTableExample" class="table table-striped table-bordered table-hover table-condensed tablesorter">
            <thead>
                <tr>
                    <th>
                        @Html.DisplayNameFor(model => model.FirstName)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.LastName)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.BirthDate)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.LastYearSchool)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.LastClass)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.ActualCountry)
                    </th>
                    @*<th>
                        @Html.DisplayNameFor(model => model.Photo)
                    </th>*@
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr>
                        <td data-title=@Html.DisplayNameFor(model => model.FirstName)>
                            @Html.DisplayFor(modelItem => item.FirstName)
                        </td>
                        <td data-title=@Html.DisplayNameFor(model => model.LastName)>
                            @Html.DisplayFor(modelItem => item.LastName)
                        </td>
                        <td data-title=@Html.DisplayNameFor(model => model.BirthDate)>
                            @Html.DisplayFor(modelItem => item.BirthDate)
                        </td>
                        <td data-title=@Html.DisplayNameFor(model => model.LastYearSchool)>
                            @Html.DisplayFor(modelItem => item.LastYearSchool)
                        </td>
                        <td data-title=@Html.DisplayNameFor(model => model.LastClass)>
                            @Html.DisplayFor(modelItem => item.LastClass)
                        </td>
                        <td data-title=@Html.DisplayNameFor(model => model.ActualCountry)>
                            @Html.DisplayFor(modelItem => item.ActualCountry)
                        </td>
                        @*<td data-title=@Html.DisplayNameFor(model => model.Photo)>
                            <img class="img-rounded" src="@item.PhotoUrl" alt="@item.LastName" title="@(item.FirstName + ' ' + item.LastName)" />
                        </td>*@
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>
